﻿"use strict";
define(["service/service", "service/httpService"], function (service) {
    service.factory("authService", function ($location, httpService) {
        var methods = {
            register: function (params) {
                return httpService.post("/account/register", params);
            },
            login: function (params) {
                return httpService.post("/account/login", params);
            },
            forget: function (params) {
                return httpService.post("/account/forget", params);
            },
            change_mobile: function (params) {
                return httpService.post("/account/change_mobile", params);
            },
            change_pwd: function (params) {
                return httpService.post("/account/change_pwd", params);
            },
            profile: function () {
                return httpService.post("/account/profile");
            },
            save_profile: function (params) {
                return httpService.post("/account/save_profile", params);
            },
            get_permission: function () {
                return httpService.get("/account/getpermission");
            },
            get_companys: function () {
                return httpService.post("/account/get_companys");
            },
            choose_company: function (params) {
                return httpService.post("/account/choose_company", params);
            }
        }
        return methods;
    });
});